package com.ums.scumspay.sync;

import com.ums.scumspay.service.PayOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.io.*;
import java.nio.file.Files;

@Configuration
@EnableScheduling
public class PayOrderSync {

    @Autowired
    private PayOrderService payOrderService;

    @Scheduled(cron = "0 10 0 * * ?")
    public void createFile(){
        payOrderService.createFile();
    }

}
